package com.whc.gulimall.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whc.gulimall.order.entity.OrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 订单
 *
 * @author wanghaochen
 * @email angaoen@outlook.com
 * @date 2022-03-05 00:16:47
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {

    /**
     * 通过orderSN获取订单状态
     *
     * @param orderSN orderSN
     * @return 订单状态
     */
    Integer selectOrderStatusByOrderSN(@Param("orderSN") String orderSN);

    /**
     * 通过orderSn修改订单状态
     *
     * @param orderSn 订单编号
     * @param status  订单状态
     */
    void updateStatusByOrderSn(@Param("orderSn") String orderSn, @Param("status") Integer status);
}
